import http from '@/utils/http2.js'

/**
 * 出货列表
 * @param data
 * @returns {Promise<axios.AxiosResponse<any>>}
 */
export function queryShipmentList(data){
  return http.post("/api/shipment/list",data)
}
/**
 * 导出出货单
 * @returns 
 */
export function exportExcel() { 
  return http.post("/api/shipment/exportSM",{})
}


/**
 * 批量删除
 * @param ids
 * @returns {Promise<axios.AxiosResponse<*>>}
 */
export function DeleteShipments(ids){
  return http.delete("/api/shipment/deletes?ids="+ids,ids)
}

/**
 * 审核出货单
 * @param data
 * @returns {Promise<axios.AxiosResponse<*>>}
 */
export function auditShipment(data){
  return http.put("/api/shipment/status",data)
}
/**
 * 保存出货单
 * @param {*} data 
 * @returns 
 */
export function SaveShipment(data) {
  return http.post("/api/shipment/save",data)
}
/**
 * 修改
 * @param {*} data 
 * @returns 
 */
export function updateShipment(data){
  return http.put("/api/shipment/update",data)
}

/**
 * 详情
 * @param id
 * @returns {Promise<axios.AxiosResponse<*>>}
 */
export function getDetail(id){
  return http.get("/api/shipment/detail",{id})
}